package com.xiaoge.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
* @Author: 冷俊杰
* @Description: 广告信息
* @DateTime: 2022/11/9 20:01
**/
@Data
@TableName(value = "edu_adv")
public class EduAdv {
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "gmt_create",fill = FieldFill.INSERT)//创建时自动填充
    private Date gmtCreate;

    /**
     * 修改时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "gmt_modified",fill = FieldFill.INSERT_UPDATE)//创建与修改时自动填充
    private Date gmtModified;

    /**
     * 状态(1:正常，0:禁用)
     */
    @TableField(value = "status_id")
    private Byte statusId;

    /**
     * 排序
     */
    @TableField(value = "sort")
    private Integer sort;

    /**
     * 广告标题
     */
    @TableField(value = "adv_title")
    private String advTitle;

    /**
     * 广告图片
     */
    @TableField(value = "adv_img")
    private String advImg;

    /**
     * 广告链接
     */
    @TableField(value = "adv_url")
    private String advUrl;

    /**
     * 广告跳转方式
     */
    @TableField(value = "adv_target")
    private String advTarget;

    /**
     * 广告位置(1首页轮播)
     */
    @TableField(value = "adv_location")
    private Byte advLocation;

    /**
     * 开始时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "begin_time")
    private Date beginTime;

    /**
     * 结束时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "end_time")
    private Date endTime;

    /**
     * 位置(0电脑端，1微信端)
     */
    @TableField(value = "plat_show")
    private Byte platShow;

    public static final String COL_ID = "id";

    public static final String COL_GMT_CREATE = "gmt_create";

    public static final String COL_GMT_MODIFIED = "gmt_modified";

    public static final String COL_STATUS_ID = "status_id";

    public static final String COL_SORT = "sort";

    public static final String COL_ADV_TITLE = "adv_title";

    public static final String COL_ADV_IMG = "adv_img";

    public static final String COL_ADV_URL = "adv_url";

    public static final String COL_ADV_TARGET = "adv_target";

    public static final String COL_ADV_LOCATION = "adv_location";

    public static final String COL_BEGIN_TIME = "begin_time";

    public static final String COL_END_TIME = "end_time";

    public static final String COL_PLAT_SHOW = "plat_show";
}